package com.yifeng.repo.controller.traffic.model;

/**
 * @author hx
 * @date 2018/11/21
 */
public enum PlatformEnum {

    JDDJ,
    MTWM,
    UD,
    LINK_MALL,
    ELM,
    ;

    public static PlatformEnum get(String raw) {
        try {
            return PlatformEnum.valueOf(raw.toUpperCase());
        } catch (Exception e) {
            return null;
        }
    }

    public String getDesc() {
        switch (this) {
            case JDDJ:
                return "京东到家";
            case MTWM:
                return "美团外卖";
            case UD:
                return "药联";
            case LINK_MALL:
                return "脉家商城";
            case ELM:
                return "饿了么";
            default:
                return "无效平台: " + this;
        }
    }
}
